package cn.edu.scau.cmi.suwenpeng.chapter10;
import java.util.*;
public class Analysis {
	public static double getTotalScore(String s) {
		@SuppressWarnings("resource")
		Scanner scanner=new Scanner(s);
		scanner.useDelimiter("[^0123456789.]+");
		double totalScore=0;
		while(scanner.hasNext()) {
			try {
				double score=scanner.nextDouble();
				totalScore=totalScore+score;
			}
			catch(InputMismatchException exp) {
				@SuppressWarnings("unused")
				String t=scanner.next();
			}
		}
		return totalScore;
	}

}
